package Homework.Top2;

public class Test4 {
    public static void main(String[] args) {
        StringBuffer sb1=new StringBuffer();
        StringBuilder sb2=new StringBuilder();

        long start1=System.nanoTime();
        for (int i=0;i<100000;i++){
            sb1.append("*");
        }
        long end1=System.nanoTime();
        System.out.println(end1-start1);

        long start2=System.nanoTime();
        for (int i=0;i<100000;i++){
            sb2.append("^");
        }
        long end2=System.nanoTime();
        System.out.println(end2-start2);
    }
}
